{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->
		{include admin.inc.menu}
		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			<!-- start of inner-frame -->
			<div class="inner-iframe">
				{include admin.inc.bread}
				<ul class="nav nav-tabs">
					<!--<li><a href="{$add_url}"><i class="glyphicon glyphicon-plus"></i> 添加广告位</a></li>-->
					<li class="active"><a href="javascript:void(0);"><i class="glyphicon glyphicon-th-list"></i> 广告位列表</a></li>
					<!--<li><a href="/admin/index/edit"><i class="glyphicon glyphicon-edit"></i> 编辑广告位</a></li>-->

				</ul>
				<div class="inner-container">
					<form class="form-inline search-form" role="form">
						<input type="hidden" name="pagesize" value="{$pagesize}" >
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									标题
								</div>
								<input type="text" class="form-control input-sm" maxlength="50" placeholder="标题" name="s_title" value="{$s_title}">
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									描述
								</div>
								<input type="text" class="form-control input-sm" maxlength="255" placeholder="描述" name="s_summary" value="{$s_summary}">
							</div>
						</div>

						<!-- searchinput-->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									类型
								</div>
								<select name="s_cate" class="form-control">
									<option value="">全部</option>
									<!--<option {if $s_cate=="1"}selected{/if} value="1">文字</option>-->
									<option {if $s_cate=="0"}selected{/if} value="0">图片</option>
								</select>
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									默认显示
								</div>
								<select name="s_default_type" class="form-control">
									<option value="">全部</option>
									<!--<option {if $s_default_type=="1"}selected{/if} value="1">文字</option>-->
									<option {if $s_default_type=="0"}selected{/if} value="0">图片</option>
								</select>
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									默认显示的内容
								</div>
								<input type="text" class="form-control input-sm" maxlength="255" placeholder="默认显示的内容" name="s_default_content" value="{$s_default_content}">
							</div>
						</div>
						
						<!-- searchinput -->
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									状态
								</div>
								<select name="s_status" class="form-control">
									<option value="">全部</option>
									<option {if $s_status=="0"}selected{/if} value="0">禁用</option>
									<option {if $s_status=="1"}selected{/if} value="1">启用</option>
								</select>
							</div>
						</div>
						
						
						

						<input type="hidden" name="order" value="{$order}">
						<button type="submit" class="btn btn-sm btn-success">搜索</button>
						<!-- search form end -->
					</form>
					<form id="J_List_Form">
						<div class="table-responsive">
							<table id="J_ListTable" class="table  table-hover  table-striped">
								<!--tmpl-listtable-->

								<!-- listblock -->
								<thead>
									<tr>
										<th width="20"><input type="checkbox" class="icheck check-all" /></th>
										<th>标题&nbsp;<i data-val='{if $order=="title ASC"}title DESC{else}title ASC{/if}' class='fa ofield {if $order=="title ASC"}fa-chevron-up{elseif $order=="title DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>

										<th>key&nbsp;<i style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>描述&nbsp;<i data-val='{if $order=="summary ASC"}summary DESC{else}summary ASC{/if}' class='fa ofield {if $order=="summary ASC"}fa-chevron-up{elseif $order=="summary DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>规格(px)&nbsp;<i data-val='' class='fa ofield fa-minus' style='color:#eee;' href='javascript:;'></i>
										</th>
										&nbsp;<i data-val='{if $order=="height ASC"}height DESC{else}height ASC{/if}' class='fa ofield {if $order=="height ASC"}fa-chevron-up{elseif $order=="height DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>类型<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="cate ASC"}cate DESC{else}cate ASC{/if}' class='fa ofield {if $order=="cate ASC"}fa-chevron-up{elseif $order=="cate DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>默认显示<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="default_type ASC"}default_type DESC{else}default_type ASC{/if}' class='fa ofield {if $order=="default_type ASC"}fa-chevron-up{elseif $order=="default_type DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>默认显示的内容<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="default_content ASC"}default_content DESC{else}default_content ASC{/if}' class='fa ofield {if $order=="default_content ASC"}fa-chevron-up{elseif $order=="default_content DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>状态<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="status ASC"}status DESC{else}status ASC{/if}' class='fa ofield {if $order=="status ASC"}fa-chevron-up{elseif $order=="status DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>操作人<!--tmpl-orderth-->
										
										&nbsp;<i data-val='{if $order=="manager_id ASC"}manager_id DESC{else}manager_id ASC{/if}' class='fa ofield {if $order=="manager_id ASC"}fa-chevron-up{elseif $order=="manager_id DESC"}fa-chevron-down{else}fa-minus{/if}' style='color:#eee;' href='javascript:;'></i>
										</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
								{if empty($items)}
								<tr>
									<td style="text-align:center;" colspan="9" class="empty-table-td">{$emptyRecord}</td>
								</tr>
								{/if}
								{loop $items $value}
								<tr>
									<td><input type="checkbox" class="icheck" name="ids[]" value="{$value[id]}"/></td>
									<!--tmpl-fieldlist-->
								
									<td>{$value[title]}</td>
									<td>{$value[key]}</td>
									<td>{$value[summary]}</td>
									<td>{$value[width]}x{$value[height]}</td>
									<td>{if $value[cate] == 1}图片{else}图片{/if}</td>
									<td>{if $value[default_type] == 1}图片{else}图片{/if}</td>
									<td>{$value[default_content]}</td>
									<td>{if $value[status] == 1}启用{else}禁用{/if}</td>
									<td>{$value[manager_name]}</td>
									<td>
										{if in_case_array('admin/adplace/edit',$priv) || empty($priv)}
										  <a href="{$edit_url}?id={$value[id]}" class="btn btn-primary btn-xs">
											<i class="glyphicon glyphicon-edit"></i> 编辑</a>
										{/if}
										{if in_case_array('admin/adplace/add',$priv) || empty($priv)}

										  <a href="{url admin/ad/add}?ad_place_key={$value[key]}" class="btn btn-primary btn-xs">
											<i class="glyphicon glyphicon-plus"></i> 添加广告</a>
										{/if}

										  <a href="{url admin/ad/index}?s_ad_place_key={$value[key]}" class="btn btn-primary btn-xs">
											<i class="glyphicon glyphicon-edit"></i> 查看广告</a>
									</td>
								</tr>
								{/loop}
							</table>
						</div>
					</form>
					<div class="text-right">
						{$pagemenu}
					</div>
				</div>
			</div>
		</section>
	</div>
</div>
{include admin.inc.footer}
<script id="editpanel" type="text/html">
	<div>
		<form id="editpanel-form" class="form-horizontal">
			<div class="row">&nbsp</div>
			<div class="form-group">
				<label >标题 </label>
				<input  dtype="" class="form-control" maxlength="50" name="data[title]" placeholder="标题" required cname="标题" value="{[title]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >描述 </label>
				<input  dtype="" class="form-control" maxlength="255" name="data[summary]" placeholder="描述" required cname="描述" value="{[summary]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >宽 </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[width]" placeholder="宽" required cname="宽" value="{[width]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >高 </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[height]" placeholder="高" required cname="高" value="{[height]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >打开方式 </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[cate]" placeholder="打开方式" required cname="打开方式" value="{[cate]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >默认显示 </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[default_type]" placeholder="默认显示" required cname="默认显示" value="{[default_type]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >默认显示的内容 </label>
				<input  dtype="" class="form-control" maxlength="255" name="data[default_content]" placeholder="默认显示的内容" required cname="默认显示的内容" value="{[default_content]}" />
			</div>
			<p class="help-block"></p>
			
			<!-- input -->
			<div class="form-group">
				<label >打开方式 </label>
				<input  dtype="" class="form-control" maxlength="{maxlength}" name="data[status]" placeholder="打开方式" required cname="打开方式" value="{[status]}" />
			</div>
			<p class="help-block"></p>
		</form>
	</div>
</script>

<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/information_ad_placeindex",function (parameter){
		<!--tmpl-templatejavascript-->
		parameter.detailUrl="{$detail_url}";
		parameter.deleteUrl="{$delete_url}";
		parameter.editUrl="{$do_edit_url}";
		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		parameter.init();		
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[loop pages page]}
		<li {[if curr == page]}class="active"{[/if]}><a class="assoc-page" data-page="{[page]}"  href="javascript:void(0)">{[page]}</a></li> 
		{[/loop]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>
</body>
</html>
